package com.flash.TAManagement.controller;

import com.flash.TAManagement.entity.TaDealingBalance;
import com.flash.TAManagement.service.TaDealingBalanceService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class TaSettlementController {
    @Resource
    private TaDealingBalanceService taDealingBalanceService;
    @RequestMapping("/toTaSettlement")
    public String toTaSettlement(){
        System.out.println("跳转页面");
        return "TaSettlement";
    }
    @RequestMapping("/selectTaDealingBalance")
    @ResponseBody
    public Map selectTaDealingBalance(){
        System.out.println("查询Ta控制器");
        List<TaDealingBalance> taDealingBalances = taDealingBalanceService.selectTaDealingBalance();
        System.out.println("查出的数据"+taDealingBalances);
        HashMap map = new HashMap();
        map.put("code","0");
        map.put("msg","");
        map.put("count",null);
        map.put("data",taDealingBalances);
        return map;
    }
}
